SIGRTMIN and SIGRTMAX

SIGRTMIN
Description First real-time signal
Default action Abnormal termination of the process
SA_SIGINFO macros

None

SIGRTMAX
Description Last real-time signal
Default action Abnormal termination of the process
SA_SIGINFO macros

None

On POSIX-compliant platforms, SIGRTMIN through SIGRTMAX are signals sent to computer programs for user-defined purposes. The macros for SIGRTMIN and SIGRTMAX are defined in the header file signal.h. Symbolic signal names are used because signal numbers can vary across platforms. POSIX does not require them to be compile time constants[1], and the NPTL implementation of glibc doesn't implement them as compile time constants.

Etymology

SIG is a common prefix for signal names. RTMIN is an abbreviation for real-time minimum; RTMAX is an abbreviation for real-time maximum.

Usage

The real-time signals, ranging from SIGRTMIN to SIGRTMAX, are a set of signals that can be used for application-defined purposes.

Because SIGRTMIN may have different values on different Unix-like systems, applications should always refer to the signals in the form SIGRTMIN+n, where n is a constant integer expression.

The real-time signals have a number of properties that differentiate them from other signals and make them suitable for application-defined purposes:

On some early versions of Linux 2.6, LinuxThreads uses the first three real-time signals, so threaded applications that support LinuxThreads should not use these signals for their own purposes. Note that the LinuxThreads library has been superseded by the Native POSIX Thread Library (NPTL) and so this caveat is no longer a concern.

References

  1. ^ signal.h
  2. ^ sigqueue(2): queue a signal and data to a process – Linux System Calls Manual